import * as api from "@/api/comment"

export default{
    namespaced:true,
    state:{
        commentData:[]
    },
    mutations:{
        SET_COMMENT(state,payload){
            state.commentData=payload
        }

    },
    actions:{
        // 请求评论
        async FETCH_COMMENT(context){
            let res= await api.getComment()
            console.log(res)
            context.commit("SET_COMMENT",res.data.data)
        }
    }
}